
#include <stdlib.h>
int main() 
{

		    pid_t pid=fork();
			int x = 1;
			
		   	
					    if (pid == 0) {
								  /* child */
									printf("child : x=%d\n", ++x);
									exit(0);
									    }
						
						    /* parent */
						    printf("parent: x=%d\n", --x);
							    exit(0);
}



